﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media.Imaging;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Media;

namespace PriceCuttingWar
{
	public struct ItemInfo
    {
        public int Type;
        public int Money;
        public int Money2;
    }
    public partial class UIFood : UserControl
    {
        public UIFood()
		{
			// 为初始化变量所必需
			InitializeComponent();
            iteminfo.Money = 0;
            iteminfo.Type = 1;
            this.CacheMode = new BitmapCache();
        }
        private ItemInfo iteminfo;
        public int Money
        {
            get { return iteminfo.Money; }
            set
            {
                iteminfo.Money = value;
            }
        }
        public int Money2
        {
            get { return iteminfo.Money2; }
            set
            {
                iteminfo.Money2 = value;
            }
        }

        public int Type
        {
            get { return iteminfo.Type; }
            set
            {
                iteminfo.Type = value;
                ItemImage.Source = new BitmapImage(new Uri(@"/PriceCuttingWar;Component/Images/" + value + ".png", UriKind.Relative));
                //switch (value)
                //{
                //    case 0:
                //        break;
                //    case 1:                        
                //        break;
                //    case 2:
                //        break;
                //    case 3:
                //        break;
                //    case 4:
                //        break;
                //    case 5:
                //        break;
                //}
            }
        }
    }
}
